<%@ page language="java" contentType="text/html; charset=UTF-8"	%>
<%@ include file="/WEB-INF/classes/com/witframework/webroot/framework/common/taglibs.jsp"%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<title>entityMeta</title>
		<%@ include file="/WEB-INF/classes/com/witframework/webroot/framework/common/meta.jsp"%>
	</head>
	<body class="content">				
		<form name="entityMetaForm" action="metaEntityController.wit?app_id=<wit:param name="app_id"/>&module=<wit:param name="module"/>" method="post">			
			<div class="page-navigate" >
				<img src="${contextPath}/webresource/images/meta/module.jpg">
				<span>
					应用开发-<a href="${contextPath}/metaAppController.wit">
					应用</a>-<a href="${contextPath}/metaModuleController.wit?app_id=<wit:param name="app_id"/>">
					模块</a>-<a href="${contextPath}/classpath:/com/witframework/meta/view/Unit/wizard1.jsp.wit?app_id=<wit:param name="app_id"/>&module=<wit:param name="module"/>">
					单元</a>-创建数据表和实体类
				</span>
			</div>		
			<div align=right class="fix-operation" >
				<wit:fullSearchBar form="entityMetaForm"/>
	  			<a href="#" onclick="query(document.entityMetaForm,'metaEntityController.wit?app_id=<wit:param name="app_id"/>&module=<wit:param name="module"/>')">
	  				<img src="${contextPath}/webresource/images/operation/search.gif">
	  			</a>
			</div>		
			
			<div id="optbar" class="operation">	
					<a href="metaEntityController!edit.wit?module=<wit:param name="module"/>" accesskey="a">
	  					<img style="border:0px;vertical-align:middle;" src="${contextPath}/webresource/images/ico_btn_add.gif">
	  					新增(A)</a>	 
					<a href="javascript:edit(document.entityMetaForm,'','metaEntityController!edit.wit')" accesskey="e">
					<img src="${contextPath}/webresource/images/ico_btn_edit.gif">
						编辑(E)</a>
					<a href="javascript:batch_del(document.entityMetaForm,'','metaEntityController!delete.wit?module=<wit:param name="module"/>')" class="NG" accesskey="r">
	  					<img style="border:0px;vertical-align:middle;" src="${contextPath}/webresource/images/ico_btn_del.gif">
	  					删除(R)</a>	     				
			</div>
			<div id="entityMetaEcTableDiv" style="overflow-x:auto;overflow-y:hidden">
			<ec:table items="entityMetaList" var="entityMeta"	tableId="entityMeta"
				action="metaEntityController.wit?module=${module}/>"	state="persist"	ajax="true"	form="entityMetaForm"
				>
				<ec:row>
					<ec:column property="ROWCOUNT" title=" " sortable="false" width="5%" viewsAllowed="html">
						${ROWCOUNT}
					</ec:column>
					<ec:column property="checkbox" title=" " sortable="false" width="5%" viewsAllowed="html">
						<input type="checkbox" name="itemlist" value="${entityMeta.id}" style="border: 0px" />
					</ec:column>

					<ec:column property="className" alias="className" title="类名" />

					<ec:column property="displayName" alias="displayName" title="名称" width="150"/>

					<ec:column property="tableName" alias="tableName" title="表名" width="150"/>

					<ec:column property="modified" alias="modified" title="修改时间" cell="date" width="100" format="yyyy-mm-dd hh:mm"/>

					<ec:column property="nofieldName" title="action" width="50" sortable="false">
						<a href="metaEntityController!edit.wit?id=${entityMeta.id}">
							<img border=0 src="${contextPath}/webresource/images/operation/edit.gif">
						</a>
						<a href="javascript:delItem(document.entityMetaForm,'metaEntityController!delete.wit?itemlist=${entityMeta.id}&catalog=<wit:param name="catalog"/>')">
							<img border=0 src="${contextPath}/webresource/images/operation/del.gif">
						</a>
					</ec:column>
				</ec:row>
			</ec:table>
			<BR>
			</div>
			<script>
			window.parent.frames.menu.selectTree("module_<wit:param name="catalog"/>");						
			</script>
		</form>
	</body>
</html>